package com.woniuxy.creditsystem.statisticsmag.controller;


import com.woniuxy.creditsystem.common.bean.FinanceInfo;
import com.woniuxy.creditsystem.statisticsmag.service.IFinanceService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 运营数据controller
 * @author 刘川
 */
@RequestMapping("/op")
@RestController
public class OpDataController {

    @Resource
    private IFinanceService iFinanceServiceImpl;

    /**
     * 近一个月待收查询
     * @return
     */
    @GetMapping(value="/ds", produces = {"application/json;charset=utf-8"})
    public List<FinanceInfo> findMonDataDs(){
        System.out.println("aaa");
        return iFinanceServiceImpl.findMonDataDs();
    }
    /**
     * 近一个月回款查询
     * @return
     */
    @GetMapping(value="/hk", produces = {"application/json;charset=utf-8"})
    public List<FinanceInfo> findMonDataHk(){
        System.out.println("bbb");
        return iFinanceServiceImpl.findMonDataHk();
    }
    /**
     * 近一个月逾期查询
     * @return
     */
    @GetMapping(value="/yq", produces = {"application/json;charset=utf-8"})
    public List<FinanceInfo> findMonData(){
        System.out.println("ccc");
        return iFinanceServiceImpl.findMonDataYq();
    }
}
